
import { checkNameForm } from "./formRuler";

// isBoolean:true, // 是否为Boolean类型, 参数是否必须为boolen类型，不是根据options个数判断，是根据后台字段类型要求判断
const itemForm = [
  {
    value: '',
    type: 'headImgSettings',
    id: '',
    children: [
      {
        value: '标题图片',
        placeholder: '请输入',
        param: 'label',
        rule: {
          required: true,
          //validator: checkNameForm,
          trigger: ["blur"],
          msg1: '1111',
          msg2: '组件标题不能重复!',
          api: "fetchOssNameUnique",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "组件标题:",
        beforeText: '',
        afterText: '',
        width: '',
        showCount: false,
        disabled: true,
        marginLeft: 0,
        marginTop: 0,
        type: 'textInput',
        associated: '',
        associatedValue: '',
      },
      {
        value: 'headImg',
        placeholder: '请输入',
        param: 'param',
        rule: {
          required: true,
          //validator: checkNameForm,
          trigger: ["blur"],
          message: '组件标签必填!',
          api: "fetchOssNameUnique",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "组件标签:",
        beforeText: '',
        afterText: '',
        width: '',
        showCount: false,
        disabled: true,
        marginLeft: 0,
        marginTop: 0,
        type: 'textInput',
        associated: '',
        associatedValue: '',
      },
      {
        value: '',
        placeholder: '请输入',
        param: 'helpMsg',
        rule: {
          required: false,
          //validator: checkNameForm,
          trigger: ["blur"],
          msg1: '1111',
          msg2: '帮助信息不能重复!',
          api: "fetchOssNameUnique",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "帮助信息:",
        beforeText: '',
        afterText: '',
        width: '',
        showCount: false,
        disable: true,
        marginLeft: 0,
        marginTop: 0,
        type: 'textInput',
        associated: '',
        associatedValue: '',
      },
      {
        value: '',
        placeholder: '请输入',
        param: 'imgSuggest',
        rule: {
          required: false,
          //validator: checkNameForm,
          trigger: ["blur"],
          msg1: '1111',
          msg2: '图片建议宽高不能重复!',
          api: "fetchOssNameUnique",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "图片建议宽高:",
        minBeforeText: '宽',
        maxBeforeText: '高',
        minAfterText: 'PX',
        maxAfterText: 'PX',
        width: '',
        showCount: false,
        disable: true,
        minValue: '',
        maxValue: '',
        marginLeft: 0,
        marginTop: 16,
        type: 'mulNumberInput',
        associated: '',
        associatedValue: '',
        showTip: true,
        showTipText: '单图'
      },
      {
        value: false,
        param: 'rule',
        rule: {
          required: false,
          //validator: checkCreatSiteForm,
          trigger: ["blur"],
          msg1: '',
          msg2: '',
          api: "",
          key: 'siteDomain',
          params: {}, //校验传参
        },
        label: "是否必填:",
        marginLeft: 0,
        type: 'radio',
        isBoolean: true, // 是否为Boolean类型
        options: ['是', '否'],
        tips: '',
      },
      // {
      //   value: [],
      //   param: 'scene',
      //   rule: {
      //     required: false,
      //     //validator: checkCreatSiteForm,
      //     trigger: ["blur"],
      //     msg1: '',
      //     msg2: '',
      //     api: "",
      //     key: 'siteDomain',
      //     params: {}, //校验传参
      //   },
      //   label: "应用场景:",
      //   marginLeft: 0,
      //   type: 'checkbox',
      //   isBoolean: false, // 是否为Boolean类型
      //   options: ['会员注册', '会员个人资料页面'],
      //   tips: '',
      // },
    ]
  },
]
export { itemForm }